package com.szd.qiongyou20.home.search.presenter;

import com.szd.qiongyou20.home.search.bean.TieZiBean;
import com.szd.qiongyou20.home.search.modle.LoadSearchData;
import com.szd.qiongyou20.home.search.modle.SearchData;
import com.szd.qiongyou20.home.search.modle.SearchTieziListener;
import com.szd.qiongyou20.home.search.view.TieziDataToView;

/**
 * Created by SZD on 2016/12/26.
 */

public class TieziPre {

    private SearchData mSearchData;
    private TieziDataToView mTieziDataToView;
//    private String keyword;

    public TieziPre(TieziDataToView tieziDataToView, String keyword) {
        mTieziDataToView = tieziDataToView;
        mSearchData = new LoadSearchData(keyword);
    }

    public void loadDataToView() {
        mSearchData.searchTieziData(new SearchTieziListener() {
            @Override
            public void searchSuccess(TieZiBean tieZiBean) {
                mTieziDataToView.DataToView(tieZiBean);
            }

            @Override
            public void searchFaile(String string) {

            }
        });

    }
}
